<?
//phpinfo();exit;
 
// echo "SORRY, THE SITE IS TEMPORARILY DOWN";

/*************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/********** mainfile(config) 1001 header thehead my_applet mybody  somara/theme.php footer******/

	if (!isset($referer)) { $referer=""; }
            if(!defined('umodule')) {define('umodule', 'umodule');}
	require_once("mainfile.php");

	$PHP_SELF = "index.php";
	global $cookie, $user_prefix, $user;  
	cookiedecode($user);



        if(isset($_POST['name']) & isset($_POST['file'])){
            $vx=0;
        }else{
	    include("includes/1001.php");
        }

    $modpath = "";
    $home = 1;
        if (!isset($mop)) { $mop="modload"; }
        if (!isset($name)) { $name="News_Pro"; }
        if (!isset($file)) { $file="index.php"; }
        if (!isset($mod_file)) { $mod_file= $file.".php"; }
		 $ThemeSel = get_theme();

        if (preg_match("/\.\./",$name) || preg_match("/\.\./", $file)) {// sec_fix
                echo "You are so cool...";
                } else {
                $ThemeSel = get_theme();
		if (file_exists("themes/$ThemeSel/module.php")) {
			include("themes/$ThemeSel/module.php");
				if (is_active("$default_module") AND file_exists("modules/$default_module/$mod_file.php")) {
					$name = $default_module;
							}
				}

		if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) {
			$modpath = "themes/$ThemeSel/";
					}

		$modpath .= "modules/".$name."/$mod_file";//,php
// if($_GET < 2120000){$modpath = "modules/News/article.php?sid=".$_GET}
         if (file_exists($modpath)) {
			define('MODULE_FILE', true);
                        require_once("modules_call.php");
                           $thispage = $name;
                           
//echo ("exists");
//echo '<script type="text/javascript">console.log("'.$modpath.'");</script>';
//            exit;

            include($modpath); 
//header('Location: $modpath'); up till this step no output to the screen
                                // from here next we include index of different modules that includes header-central and 
                                // footer sequence for any module.
                                // header.php includes all meta , variables, css display files
                                // also page layout divs rows and columns. 
                                // the first row for the header_header
                                // the second row for the right column and central div
                                    // which is closed in footer.php
                                // the footer.php closes the second row draws the third row
                                // add modals and the js files
 			} 
			else {
			$index = 1;
			include("header.php");
			OpenTable();
				if (is_admin($admin)) {
					echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"admin.php?op=modules\">"._ADDAHOME."</a> ]</center>";
					} else {
	    			echo "<center>"._HOMEPROBLEMUSER."</center>";
	//			include("modules/News_Pro/index.php");
					}
			CloseTable();
			include("footer.php");
				}

	}
exit();

/*
//			elseif(preg_match("/modname/", $_SERVER["REQUEST_URI"]))
//			{
//			$orang = $_SERVER["REQUEST_URI"];
//			$orang = strstr($orang, 'modname');
//			$orang = preg_replace("%<>%", "=", $orang);
//			$orang = preg_replace("%/%", "&", $orang);
//			parse_str($orang, $output);
//			extract ($output);print_r($output)."\n";
//			}

		if (!isset($name) )
		{$name = "News_pro";$file = "stories";$idid = "إبراهيم شوباش";
				}

		$database = New Database;
		if(is_user($user)){
		$database->query('SELECT umodule from nuke_users_home WHERE uid=:uid');
	        $database->bind(':uid', '$cookie[0]');
		$row = $database->single();				
			$umodule = $row[umodule];
			if($umodule !==""){
                          $name = $umodule;
			  }
		}
	if (!isset($_REQUEST['$name'])) {
        	$database->query('SELECT main_module from nuke_main');
		$row = $database->single();				
		$name = $row[main_module];
}
		$database = NULL;


$result = sql_query("UPDATE jordata_jor.nuke_config SET foot3 =
(  © 2013-2001 خدمة تثقيفية ليست بديلاً لعلاج طبيبك. ألإشتراك ضروري للتفاعلية المسؤولة.السرية مضمونة. ألأراء حق ومسؤولية مقدمها);


if ($httpref==1) {
    $referer = getenv("HTTP_REFERER");
    if ($referer=="" OR preg_match("/^unknown/i", $referer) OR substr("$referer",0,strlen($nukeurl))==$nukeurl OR preg_match("/^bookmark/i",$referer)) {
    } else {
        sql_query("insert into ".$prefix."_referer values (NULL, '$referer')", $dbi);
    }
    $result = sql_query("select * from ".$prefix."_referer", $dbi);
    $numrows = sql_num_rows($result, $dbi);
    if($numrows>=$httprefmax) {
        sql_query("delete from ".$prefix."_referer", $dbi);
			}
		}

 if (!isset($mod_file)) { $mod_file="index"; }
    if (!isset ($cookie[1])){
    	$infos = base64_encode("0:0:0:0:0:0:0:0:0:0:0");
	setcookie("user","$infos",time()+2592000);
    	unset ($user);
    	unset ($cookie);
    	}

*/
/*

               			$database = New database;
	    	$database->query('SELECT * FROM nuke_mail_config1 ');
//		    $database->bind(':email', $_POST['user_email']);
    		$result = $database->single();
echo '<pre>'; print_r($result); echo '</pre>';
            $database = NULL;
//include_once('PHPMailer-master/src/Exception.php'};
//include_once('PHPMailer-master/src/POP3.php'};
//include_once('PHPMailer-master/src/OAuth.php'};
//include_once('PHPMailer-master/src/PHPMailer.php');
//include_once('PHPMailer-master/src/SMTP.php'); //Step 4: Initialize PHP Mailer and set SMTP as mailing protocol:
include_once('includes/ailer_obsolete/class.phpmailer.php');
include_once('includes/ailer_obsolete/class.smtp

             $mail = new PHPMailer();
$mail->IsSMTP();
$mail->Mailer = "smtp";//Step 5: Set required parameters for making an SMTP connection like server, port and account credentials. SSL and TLS are both cryptographic protocols that provide authentication and data encryption between servers, machines and applications operating over a network. SSL is the predecessor to TLS.
$mail->SMTPDebug  = 1;  
$mail->SMTPAuth   = TRUE;
$mail->SMTPSecure = "tls";
$mail->Port       = 587;
$mail->Host       = "smtp.gmail.com";
$mail->Username   = "jordatanet@gmail.com";
$mail->Password   = "1Shoubash!@";
 

//Step 6: Set the required parameters for email header and body:

$mail->IsHTML(true);
$mail->AddAddress("itsh@go.com.jo", "سوياي");
$mail->SetFrom("from-email@gmail.com", "from-name");//$mail->SetFrom("admin@jordata.net", "jordata Team");
$mail->AddReplyTo("admin@jordata.net", "jordata");
$mail->AddCC("cc-recipient-email@domain", "cc-recipient-name");
$mail->Subject = "Test is Test Email sent via Gmail SMTP Server using PHP Mailer";
$content = "<b>This is a Test Email sent via Gmail SMTP Server using PHP mailer class.</b>";//Step 7: Send the email and catch required exceptions:
$mail->MsgHTML($content); 

         if(!$mail->Send()) {
  echo "Error while sending Email.";
  var_dump($mail);
} else {
  echo "Email sent successfully";
}
 

             include_once("footer.php");
*/
?>